<template>
  <div>
    <el-breadcrumb separator="/">
      <el-breadcrumb-item :to="{ path: '/home' }">首页</el-breadcrumb-item>
      <el-breadcrumb-item>订单管理</el-breadcrumb-item>
      <el-breadcrumb-item>订单列表</el-breadcrumb-item>
    </el-breadcrumb>

    <el-card>
      <el-row>
        <el-col :span="7">
          <el-input placeholder="请输入内容" v-model="input5" class="input-with-select">
            <el-button slot="append" icon="el-icon-search"></el-button>
          </el-input>
        </el-col>
      </el-row>

      <el-table>
        <el-table-colum type="index"></el-table-colum>
        <el-table-column label="订单编号"></el-table-column>
        <el-table-column label="订单价格"></el-table-column>
        <el-table-column label="是否发货"></el-table-column>
        <el-table-column label="下单时间"></el-table-column>
        <el-table-column label="操作"></el-table-column>
      </el-table>
    </el-card>
  </div>
</template>

<script>
export default {
  data() {
    return {
      orderList: []
    }
  },
  created() {
    this.getOrderList()
  },
  methods: {
    async getOrderList() {
      const { data: res } = await this.$http.get('orders')
      if (res.meta.status !== 200) return this.$message.error(res.meta.msg)
      this.orderList = res.data
    }
  }
}
</script>

<style lang="less" scoped>
</style>
